<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.3"/>
<title>Duye SDK User Wizard: duye::IPv4Addr Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { searchBox.OnSelectItem(0); });
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td style="padding-left: 0.5em;">
   <div id="projectname">Duye SDK User Wizard
   &#160;<span id="projectnumber">V1.0.0</span>
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.3 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
      <li class="current"><a href="annotated.html"><span>Classes</span></a></li>
      <li><a href="files.html"><span>Files</span></a></li>
      <li><a href="examples.html"><span>Examples</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="annotated.html"><span>Class&#160;List</span></a></li>
      <li><a href="classes.html"><span>Class&#160;Index</span></a></li>
      <li><a href="hierarchy.html"><span>Class&#160;Hierarchy</span></a></li>
      <li><a href="functions.html"><span>Class&#160;Members</span></a></li>
    </ul>
  </div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark">&#160;</span>Friends</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(8)"><span class="SelectionMark">&#160;</span>Macros</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(9)"><span class="SelectionMark">&#160;</span>Pages</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><b>duye</b></li><li class="navelem"><a class="el" href="classduye_1_1_i_pv4_addr.html">IPv4Addr</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="classduye_1_1_i_pv4_addr-members.html">List of all members</a>  </div>
  <div class="headertitle">
<div class="title">duye::IPv4Addr Class Reference</div>  </div>
</div><!--header-->
<div class="contents">

<p>IPv4 address.  
 <a href="classduye_1_1_i_pv4_addr.html#details">More...</a></p>

<p><code>#include &lt;<a class="el" href="duye__socket_8h_source.html">duye_socket.h</a>&gt;</code></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:acd962f8d46b52e8f64d15b077b1516f2"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classduye_1_1_i_pv4_addr.html#acd962f8d46b52e8f64d15b077b1516f2">IPv4Addr</a> ()</td></tr>
<tr class="memdesc:acd962f8d46b52e8f64d15b077b1516f2"><td class="mdescLeft">&#160;</td><td class="mdescRight">auto get local address, and rand setting a port  <a href="#acd962f8d46b52e8f64d15b077b1516f2"></a><br/></td></tr>
<tr class="separator:acd962f8d46b52e8f64d15b077b1516f2"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7d377ea655353d6d5ea5c864c3adf342"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a7d377ea655353d6d5ea5c864c3adf342"></a>
&#160;</td><td class="memItemRight" valign="bottom"><b>IPv4Addr</b> (const uint32 ip, const uint16 port=0)</td></tr>
<tr class="separator:a7d377ea655353d6d5ea5c864c3adf342"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a58e14639d717cd8179aa7083639c70bc"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classduye_1_1_i_pv4_addr.html#a58e14639d717cd8179aa7083639c70bc">setIp</a> (const uint32 ip)</td></tr>
<tr class="memdesc:a58e14639d717cd8179aa7083639c70bc"><td class="mdescLeft">&#160;</td><td class="mdescRight">set/get IP address  <a href="#a58e14639d717cd8179aa7083639c70bc"></a><br/></td></tr>
<tr class="separator:a58e14639d717cd8179aa7083639c70bc"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a78fe7c8ecb7f7d4ab2415090f1dba07a"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a78fe7c8ecb7f7d4ab2415090f1dba07a"></a>
uint32&#160;</td><td class="memItemRight" valign="bottom"><b>ip</b> ()</td></tr>
<tr class="separator:a78fe7c8ecb7f7d4ab2415090f1dba07a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:acb68e8b18129d760ffa4a1cdfe5b02de"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="acb68e8b18129d760ffa4a1cdfe5b02de"></a>
const uint32&#160;</td><td class="memItemRight" valign="bottom"><b>ip</b> () const </td></tr>
<tr class="separator:acb68e8b18129d760ffa4a1cdfe5b02de"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9b47b89d1362652205b8a3caef50c1c1"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a9b47b89d1362652205b8a3caef50c1c1"></a>
uint8 *&#160;</td><td class="memItemRight" valign="bottom"><b>ipStr</b> ()</td></tr>
<tr class="separator:a9b47b89d1362652205b8a3caef50c1c1"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a30d847cbe35b70d69349abbf503640d3"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a30d847cbe35b70d69349abbf503640d3"></a>
const uint8 *&#160;</td><td class="memItemRight" valign="bottom"><b>ipStr</b> () const </td></tr>
<tr class="separator:a30d847cbe35b70d69349abbf503640d3"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a00163ce7439478b71df415ecc10b0821"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classduye_1_1_i_pv4_addr.html#a00163ce7439478b71df415ecc10b0821">setPort</a> (const uint16 port)</td></tr>
<tr class="memdesc:a00163ce7439478b71df415ecc10b0821"><td class="mdescLeft">&#160;</td><td class="mdescRight">set/get port  <a href="#a00163ce7439478b71df415ecc10b0821"></a><br/></td></tr>
<tr class="separator:a00163ce7439478b71df415ecc10b0821"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aab6f14d1eff8f308a56bbe8fb632e7bf"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="aab6f14d1eff8f308a56bbe8fb632e7bf"></a>
uint16&#160;</td><td class="memItemRight" valign="bottom"><b>port</b> ()</td></tr>
<tr class="separator:aab6f14d1eff8f308a56bbe8fb632e7bf"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7b25ae9dbcf1b21337855313d6702ece"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a7b25ae9dbcf1b21337855313d6702ece"></a>
const uint16&#160;</td><td class="memItemRight" valign="bottom"><b>port</b> () const </td></tr>
<tr class="separator:a7b25ae9dbcf1b21337855313d6702ece"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab99e8b05d31fb9607416015cf81f999b"><td class="memItemLeft" align="right" valign="top">sockaddr_in &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classduye_1_1_i_pv4_addr.html#ab99e8b05d31fb9607416015cf81f999b">addr</a> ()</td></tr>
<tr class="memdesc:ab99e8b05d31fb9607416015cf81f999b"><td class="mdescLeft">&#160;</td><td class="mdescRight">set/get sock addr  <a href="#ab99e8b05d31fb9607416015cf81f999b"></a><br/></td></tr>
<tr class="separator:ab99e8b05d31fb9607416015cf81f999b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af6f1fd45e5909670998d1664ae410c0b"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="af6f1fd45e5909670998d1664ae410c0b"></a>
const sockaddr_in &amp;&#160;</td><td class="memItemRight" valign="bottom"><b>addr</b> () const </td></tr>
<tr class="separator:af6f1fd45e5909670998d1664ae410c0b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a77b7729840bb165523424441200e39a4"><td class="memItemLeft" align="right" valign="top">uint16&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classduye_1_1_i_pv4_addr.html#a77b7729840bb165523424441200e39a4">addrLen</a> () const </td></tr>
<tr class="memdesc:a77b7729840bb165523424441200e39a4"><td class="mdescLeft">&#160;</td><td class="mdescRight">get sock address length  <a href="#a77b7729840bb165523424441200e39a4"></a><br/></td></tr>
<tr class="separator:a77b7729840bb165523424441200e39a4"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>IPv4 address. </p>
</div><h2 class="groupheader">Constructor &amp; Destructor Documentation</h2>
<a class="anchor" id="acd962f8d46b52e8f64d15b077b1516f2"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">duye::IPv4Addr::IPv4Addr </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>auto get local address, and rand setting a port </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">ip</td><td>: ip address </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">port</td><td>: port, default is 0, will random generate </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<h2 class="groupheader">Member Function Documentation</h2>
<a class="anchor" id="ab99e8b05d31fb9607416015cf81f999b"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">sockaddr_in&amp; duye::IPv4Addr::addr </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>set/get sock addr </p>
<dl class="section return"><dt>Returns</dt><dd></dd></dl>

</div>
</div>
<a class="anchor" id="a77b7729840bb165523424441200e39a4"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">uint16 duye::IPv4Addr::addrLen </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>get sock address length </p>
<dl class="section return"><dt>Returns</dt><dd></dd></dl>

</div>
</div>
<a class="anchor" id="a58e14639d717cd8179aa7083639c70bc"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void duye::IPv4Addr::setIp </td>
          <td>(</td>
          <td class="paramtype">const uint32&#160;</td>
          <td class="paramname"><em>ip</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>set/get IP address </p>
<dl class="section return"><dt>Returns</dt><dd></dd></dl>

</div>
</div>
<a class="anchor" id="a00163ce7439478b71df415ecc10b0821"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void duye::IPv4Addr::setPort </td>
          <td>(</td>
          <td class="paramtype">const uint16&#160;</td>
          <td class="paramname"><em>port</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>set/get port </p>
<dl class="section return"><dt>Returns</dt><dd></dd></dl>

</div>
</div>
<hr/>The documentation for this class was generated from the following file:<ul>
<li>Z:/duye/src/duyebase/system/<a class="el" href="duye__socket_8h_source.html">duye_socket.h</a></li>
</ul>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated on Mon Feb 27 2017 15:19:20 for Duye SDK User Wizard by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.3
</small></address>
</body>
</html>
